#    This file is part of testlink-api-client.
#
#    testlink-api-client is free software: you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation, either version 3 of the License, or
#    (at your option) any later version.
#
#    testlink-api-client is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with testlink-api-client.  If not, see <http://www.gnu.org/licenses/>.

require 'test_link/adapters/base'
require 'test_link/objects/status'

module TestLink
  module Adapters
    class StatusAdapter < Base
      def adapt_row row
        status = Objects::Status.new
        status.id = row['id'].to_i
        status.message = row['message']
        status.status = row['status']
        status.additional_info = row['additionalInfo']
        status.operation = row['operation']
        status
      end
    end
  end
end
